package lotusfall;

import com.lotusfall.controller.UserController;
import com.lotusfall.pojo.User;
import com.lotusfall.pojo.s3.Student;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UsersTest1 {
    @Test
    public void testUser1(){
        UserController userController = new UserController();
        int num = userController.insert(new User(1, "张三", 22));
        System.out.println(num);
    }

    @Test
    public void testUser(){
        // 创建对象并启动
        ApplicationContext ac = new ClassPathXmlApplicationContext("s3/applicationContext.xml");
        Student student = (Student) ac.getBean("stu");
        System.out.println(student);
    }
}
